#include "Entity.h"

Entity::Entity()
{
	stats.health = 0;
	stats.str = 0;
	stats.tough = 0;
	stats.agil = 0;
	stats. weight = 0;
	rotation = 0.0f;
	dead = false;
}

Entity::~Entity() {}

void Entity::takeDamage(int amount)
{
	stats.health -= amount/(amount+stats.tough);
	if(stats.health <= 0)
		dead = true;
}

void Entity::setFacing(Facing a_orientation)
{
	switch(a_orientation)
	{
	case NORTH: rotation = 0; break;
	case EAST: rotation = 90; break;
	case SOUTH: rotation = 180; break;
	case WEST: rotation = 270; break;
	}
}